import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
		{
			path:'/A',
			name:'AA',
			component: ()=>import('../components/coma/A.vue'),
			meta:{
			title:'AA'
			},
		},
		{
			path:'/B',
			name:'BB',
			component: ()=>import('../components/comb/B.vue'),
			meta:{
			title:'添加B'
			}
		},
		{
			path:'/C',
			name:'CC',
			component: ()=>import('../components/comc/C.vue'),
			meta:{
			title:'写C'
			}
		},
		] 
 

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

router.beforeEach((to,from,next)=>{
  document.title = to.meta.title;
  next();
})

export default router
